package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface MemberDao {
    public List<Member> findAll();
    public Page<Member> selectByCondition(String queryString);
    public void add(Member member);
    public void deleteById(Integer id);
    public Member findById(Integer id);
    public Member findByTelephone(String telephone);
    public void edit(Member member);
    public Integer findMemberCountBeforeDate(String date);
    public Integer findMemberCountByDate(String date);
    public Integer findMemberCountAfterDate(String date);
    //public Integer findMemberCountAfterDate(Map weekdate);
    public Integer findMemberTotalCount();
    //获取男性会员数量
    Integer findCountBoy();
    //获取女性会员数量
    Integer findCountGirl();
    //获取未知会员性别数量
    Integer unknowncount();
    //查询0-18、18-30、30-45年龄段内会员数量
    Integer findMemberCountBirthday(@Param("dateBegin")String dateBegin, @Param("dateEnd")String dateEnd);
    //查询大于45岁会员数量
    Integer findMemberCountBirthdayGt(@Param("date")String date);

}
